﻿//-----------------------------------------------------------------------
// <copyright file="News.xaml.cs" company="Microsoft Corporation">
//     Copyright Microsoft Corporation. All Rights Reserved. This code released under the terms of the Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.) This is sample code only, do not use in production environments.
// </copyright>
//-----------------------------------------------------------------------
namespace Microsoft.ALMRangers.VsarTreasureMap.WindowsStoreApp.Views
{
    using Microsoft.ALMRangers.VsarTreasureMap.WindowsStoreApp.News;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Input;

    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class News : Page
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="News"/> class.
        /// </summary>
        public News()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// This is raised when an item is tapped
        /// </summary>
        /// <param name="sender">The source of the event</param>
        /// <param name="e">The event arguments</param>
        private void GridViewTapped(object sender, TappedRoutedEventArgs e)
        {
            var viewModel = this.DataContext as ViewModels.News;
            viewModel.NavigateToSelectedItem();
        }
    }
}
